<template>
  <router-view/>
  <NavBar v-if="show"></NavBar>
</template>

<script setup>
import { reactive, ref } from '@vue/reactivity'
import NavBar from './components/NavBar.vue'
import { useRouter } from 'vue-router';

let show = ref(false)
const menu = reactive(['/home', '/data', '/user'])
const router = useRouter()

router.afterEach(() => { // menu里面的路径都是要展示底部导航的
  show.value = menu.includes(router.currentRoute.value.path)
})


</script>

<style lang="less">

</style>
